package tech.aistar.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import tech.aistar.entity.Agent;
import tech.aistar.service.IAgentService;

import java.util.List;


@Controller
@RequestMapping("/agents")
public class PetController {
    @Autowired
    private IAgentService agentService;
    @RequestMapping("/select")
    public String select(Model model, Agent agent){
        System.out.println("agent:"+agent);
    List<Agent> agentList =agentService.selectAll();
      model.addAttribute("agents",agentList);
        return "/home_page/home";

    }

    @RequestMapping("/student")
    public String test(){
        return "/rent/student";
    }


}
